#include <iostream>
using namespace std;

char &replace(int i); // restituisce un indirizzo

char s[80] = "Salve a tutti";

int main()
{
	replace(5) = 'X'; // assegna X allo spazio dopo Salve

	cout << s;
	cout << endl;

	return 0;
}

char &replace(int i)
{
	return s[i];
}
 